Skip to content

feat: custom domain and slug commands (stacked on full-stack deploy) - #559

Open
netanelgilad wants to merge 1 commit into
fullstack/deploy-git-hashfrom
claude/session-m669xy
Open

feat: custom domain and slug commands (stacked on full-stack deploy)#559
netanelgilad wants to merge 1 commit into
fullstack/deploy-git-hashfrom
claude/session-m669xy

Conversation

@netanelgilad

@netanelgilad netanelgilad commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Note

Description

Adds two new command groups to the CLI for managing an app's public addressing: base44 domains (add/list/remove custom domains, backed by Cloudflare custom hostnames) and base44 slug (show/set/reset the app's *.base44.app subdomain). Both follow the existing core/cli split — Zod-validated snake_case→camelCase API layers under src/core/, thin presentation commands under src/cli/commands/ — and both fully support the global --json flag. Built on top of the full-stack Workers deploy work in the target branch, where a deployed app needs a stable public hostname.

Related Issue

None

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

Custom domains (`base44 domains`)

  • `src/core/domains/` — `addDomain`, `listDomains`, `removeDomain`, plus `waitForDomainActive` which polls the list endpoint (2s interval, 10min budget) until hostname + SSL are active
  • Zod schemas transform the API's snake_case payloads to camelCase; Cloudflare-shaped DNS/ownership verification details pass through as `unknown` since they're opaque to the CLI
  • `domains add ` prints the exact CNAME record to add, current status, and a warning when the app has no production deployment yet; `--wait` polls to active with a live-updating spinner message
  • `domains list` renders a padded status table (or an empty-state message); `domains remove ` confirms interactively and requires `-y` in non-interactive mode

App slug (`base44 slug`)

  • `src/core/slug/` — `getSlug` (reads the app document) and `updateSlug` (PATCH `metadata/slug`; `null` resets to auto-generated)
  • When a slug is taken, the API's alternative suggestions are parsed off the error body and surfaced as a hint on the thrown `ApiError`
  • `base44 slug` shows the current slug + derived URL, `slug set ` prints old → new plus URL, `slug reset` returns to the auto-generated slug

Supporting changes

  • New `TimeoutError` (`UserError`, code `TIMEOUT`) for polled operations that exceed their budget
  • Registered both command groups in `program.ts`
  • Testkit: `TestAPIServer` now supports `PATCH` and gained domain/slug/app-document mocks with request capture
  • `project/logs.ts`: moved the `--follow` + `--until`/`--order` mutual-exclusion checks to the top of the action so the flag conflict is reported before any network work

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (`npm test`)

20 new integration tests across `tests/cli/domains.spec.ts` and `tests/cli/slug.spec.ts` covering human and `--json` output, the snake→camel transform, `--wait` polling to active, empty states, non-interactive `-y` enforcement, invalid slug format, taken-slug suggestions, and API error propagation.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated `docs/` (AGENTS.md) if I made architectural changes

Additional Notes

No `docs/` updates are included. The new modules follow the existing resource/command patterns rather than introducing new architecture, but the two new command groups may be worth mentioning in `docs/commands.md` / `docs/deployments.md` alongside the full-stack deploy flow.


🤖 Generated by Claude | 2026-08-03 17:19 UTC | 78ee229

@netanelgilad netanelgilad self-assigned this Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.1.7-pr.559.78ee229

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.1.7-pr.559.78ee229"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.1.7-pr.559.78ee229"
  }
}

Preview published to npm registry — try new features instantly!

@netanelgilad netanelgilad changed the title feat: full-stack deployments — deploy/promote/rollback/logs for Workers-based apps feat: full-stack deployments — build a commit's worker from the CLI (git-hash addressed) Aug 2, 2026
@netanelgilad
netanelgilad force-pushed the claude/session-m669xy branch from 4fcfa9b to c93487f Compare August 2, 2026 14:17
@netanelgilad netanelgilad changed the title feat: full-stack deployments — build a commit's worker from the CLI (git-hash addressed) feat: custom domain and slug commands (stacked on full-stack deploy) Aug 2, 2026
@netanelgilad
netanelgilad changed the base branch from main to fullstack/deploy-git-hash August 2, 2026 14:18
@netanelgilad
netanelgilad force-pushed the fullstack/deploy-git-hash branch from 5c32b34 to a588d65 Compare August 3, 2026 17:17
base44 domains add/list/remove (CNAME instructions, --wait polling to
active via TimeoutError, confirmed removal) and base44 slug / slug set /
slug reset (public subdomain management with taken-slug suggestions).
Also hoists the logs --follow flag-conflict validation ahead of function
resolution. Stacked on the full-stack deploy command.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DvhQfqxACcq25XAQRpoSh9
@netanelgilad
netanelgilad force-pushed the claude/session-m669xy branch from c93487f to 9473001 Compare August 3, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants